package com.eastcom.bm.atom;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "QA_METAL_KPI_EX_DEFINE")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Atom_MetalKpiExpand {

	private String id;
	
	private Atom_MetalKpiBase kpiBaseDefine;
	
	private String version;
	
	private String granularity;
	
	private String dimension;
	
	private String sourceDesc;
	
	private String arithmetic;
	
	private String delay;
	
	private String collectDesc;
	
	private Date updateTime;
	
	private String updateName;

	@Id
	@Column(name="ID")
	@GenericGenerator(name = "KpiExDefine-uuid", strategy = "uuid")
	@GeneratedValue(generator = "KpiExDefine-uuid")
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST})
	@JoinColumn(name="KPI_ID",referencedColumnName="ID")
	public Atom_MetalKpiBase getKpiBaseDefine() {
		return kpiBaseDefine;
	}

	public void setKpiBaseDefine(Atom_MetalKpiBase kpiBaseDefine) {
		this.kpiBaseDefine = kpiBaseDefine;
	}

	@Column(name="VERSION")
	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}
	
	@Column(name="ARITHMETIC")
	public String getArithmetic() {
		return arithmetic;
	}

	public void setArithmetic(String arithmetic) {
		this.arithmetic = arithmetic;
	}

	@Column(name="COLLECT_DESC")
	public String getCollectDesc() {
		return collectDesc;
	}

	public void setCollectDesc(String collectDesc) {
		this.collectDesc = collectDesc;
	}

	@Column(name="DELAY")
	public String getDelay() {
		return delay;
	}

	public void setDelay(String delay) {
		this.delay = delay;
	}

	@Column(name="DIMENSION")
	public String getDimension() {
		return dimension;
	}

	public void setDimension(String dimension) {
		this.dimension = dimension;
	}

	@Column(name="GRANULARITY")
	public String getGranularity() {
		return granularity;
	}

	public void setGranularity(String granularity) {
		this.granularity = granularity;
	}

	@Column(name="SOURCE_DESC")
	public String getSourceDesc() {
		return sourceDesc;
	}

	public void setSourceDesc(String sourceDesc) {
		this.sourceDesc = sourceDesc;
	}

	@Column(name="UPDATE_NAME")
	public String getUpdateName() {
		return updateName;
	}

	public void setUpdateName(String updateName) {
		this.updateName = updateName;
	}

	//@Temporal(TemporalType.TIMESTAMP)
	@Column(name="UPDATE_TIME")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
}
